<div xmlns:ext="http://www.extjs.com" class="body-wrap"><div class="inheritance res-block"><pre class="res-block-inner"><a href="output/Ext.data.Reader.html" ext:member="" ext:cls="Ext.data.Reader">Reader</a>
  <img src="resources/elbow-end.gif"><a href="output/Ext.data.JsonReader.html" ext:member="" ext:cls="Ext.data.JsonReader">JsonReader</a>
    <img src="resources/elbow-end.gif">ArrayReader</pre></div><h1>Class <a href="source/ArrayReader.html#cls-Ext.data.ArrayReader">Ext.data.ArrayReader</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext.data</td></tr><tr><td class="label">Defined In:</td><td class="hd-info"><a href="source/ArrayReader.html#cls-Ext.data.ArrayReader">ArrayReader.js</a></td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/ArrayReader.html#cls-Ext.data.ArrayReader">ArrayReader</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info"><a href="output/Ext.data.JsonReader.html" ext:cls="Ext.data.JsonReader" ext:member="">JsonReader</a></td></tr></table><div class="description"><p>Data reader class to create an Array of <a href="output/Ext.data.Model.html" ext:cls="Ext.data.Model">Ext.data.Model</a> objects from an Array.
Each element of that Array represents a row of data fields. The
fields are pulled into a Record object using as a subscript, the <code>mapping</code> property
of the field definition if it exists, or the field's ordinal position in the definition.</p>
<p><u>Example code:</u></p>
<pre><code><b>var</b> Employee = Ext.regModel(<em>'Employee'</em>, {
    fields: [
        <em>'id'</em>,
        {name: <em>'name'</em>, mapping: 1},         <i>// <em>"mapping"</em> only needed <b>if</b> an <em>"id"</em> field is present which</i>
        {name: <em>'occupation'</em>, mapping: 2}    <i>// precludes using the ordinal position as the index.        </i>
    ]
});

<b>var</b> myReader = <b>new</b> Ext.data.ArrayReader({
    model: <em>'Employee'</em>
}, Employee);</code></pre>
<p>This would consume an Array like this:</p>
<pre><code>[ [1, <em>'Bill'</em>, <em>'Gardener'</em>], [2, <em>'Ben'</em>, <em>'Horticulturalist'</em>] ]</code></pre></div><div class="hr"></div><a id="Ext.data.ArrayReader-configs"></a><h2>Config Options</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Config Options</th><th class="msource-header">Defined By</th></tr><tr class="config-row  inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.data.Reader-idProperty"></a><b><a href="source/Reader.html#cfg-Ext.data.Reader-idProperty">idProperty</a></b> : String<div class="mdesc">Name of the property within a row object
that contains a record identifier value.  Defaults to <tt>id</tt></div></td><td class="msource"><a href="output/Ext.data.Reader.html#idProperty" ext:member="#idProperty" ext:cls="Ext.data.Reader">Reader</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.data.Reader-implicitIncludes"></a><b><a href="source/Reader.html#cfg-Ext.data.Reader-implicitIncludes">implicitIncludes</a></b> : Boolean<div class="mdesc"><div class="short">True to automatically parse models nested within other models in a response
object. See the Ext.data.Reader intro doc...</div><div class="long">True to automatically parse models nested within other models in a response
object. See the Ext.data.Reader intro docs for full explanation. Defaults to true.</div></div></td><td class="msource"><a href="output/Ext.data.Reader.html#implicitIncludes" ext:member="#implicitIncludes" ext:cls="Ext.data.Reader">Reader</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.data.JsonReader-record"></a><b><a href="source/JsonReader.html#cfg-Ext.data.JsonReader-record">record</a></b> : String<div class="mdesc"><div class="short">The optional location within the JSON response that the record data itself can be found at.
See the JsonReader intro ...</div><div class="long">The optional location within the JSON response that the record data itself can be found at.
See the JsonReader intro docs for more details. This is not often needed and defaults to undefined.</div></div></td><td class="msource"><a href="output/Ext.data.JsonReader.html#record" ext:member="#record" ext:cls="Ext.data.JsonReader">JsonReader</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.data.Reader-root"></a><b><a href="source/Reader.html#cfg-Ext.data.Reader-root">root</a></b> : String<div class="mdesc"><div class="short">Required.  The name of the property
which contains the Array of row objects.  Defaults to undefined.
An exception wil...</div><div class="long"><b>Required</b>.  The name of the property
which contains the Array of row objects.  Defaults to <tt>undefined</tt>.
An exception will be thrown if the root property is undefined. The data
packet value for this property should be an empty array to clear the data
or show no data.</div></div></td><td class="msource"><a href="output/Ext.data.Reader.html#root" ext:member="#root" ext:cls="Ext.data.Reader">Reader</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.data.Reader-successProperty"></a><b><a href="source/Reader.html#cfg-Ext.data.Reader-successProperty">successProperty</a></b> : String<div class="mdesc"><div class="short">Name of the property from which to
retrieve the success attribute. Defaults to success.  See
Ext.data.DataProxy.excep...</div><div class="long">Name of the property from which to
retrieve the success attribute. Defaults to <tt>success</tt>.  See
<a href="output/Ext.data.DataProxy.html" ext:cls="Ext.data.DataProxy">Ext.data.DataProxy</a>.<a href="output/Ext.data.DataProxy.html#Ext.data.DataProxy-exception" ext:member="exception" ext:cls="Ext.data.DataProxy">exception</a>
for additional information.</div></div></td><td class="msource"><a href="output/Ext.data.Reader.html#successProperty" ext:member="#successProperty" ext:cls="Ext.data.Reader">Reader</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.data.Reader-totalProperty"></a><b><a href="source/Reader.html#cfg-Ext.data.Reader-totalProperty">totalProperty</a></b> : String<div class="mdesc"><div class="short">Name of the property from which to
retrieve the total number of records in the dataset. This is only needed
if the wh...</div><div class="long">Name of the property from which to
retrieve the total number of records in the dataset. This is only needed
if the whole dataset is not passed in one go, but is being paged from
the remote server.  Defaults to <tt>total</tt>.</div></div></td><td class="msource"><a href="output/Ext.data.Reader.html#totalProperty" ext:member="#totalProperty" ext:cls="Ext.data.Reader">Reader</a></td></tr></tbody></table><a id="Ext.data.ArrayReader-props"></a><h2>Public Properties</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Property</th><th class="msource-header">Defined By</th></tr><tr class="property-row  inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.data.JsonReader-jsonData"></a><b><a href="source/JsonReader.html#prop-Ext.data.JsonReader-jsonData">jsonData</a></b> : Mixed<div class="mdesc">DEPRECATED - will be removed in Ext JS 5.0. This is just a copy of this.rawData - use that instead</div></td><td class="msource"><a href="output/Ext.data.JsonReader.html#jsonData" ext:member="#jsonData" ext:cls="Ext.data.JsonReader">JsonReader</a></td></tr><tr class="property-row  inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.data.Reader-rawData"></a><b><a href="source/Reader.html#prop-Ext.data.Reader-rawData">rawData</a></b> : Mixed<div class="mdesc">The raw data object that was last passed to readRecords. Stored for further processing if needed</div></td><td class="msource"><a href="output/Ext.data.Reader.html#rawData" ext:member="#rawData" ext:cls="Ext.data.Reader">Reader</a></td></tr></tbody></table><a id="Ext.data.ArrayReader-methods"></a><h2>Public Methods</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Method</th><th class="msource-header">Defined By</th></tr><tr class="method-row expandable"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.data.ArrayReader-ArrayReader"></a><b class="constructor"><a href="source/ArrayReader.html#cls-Ext.data.ArrayReader">ArrayReader</a></b><span class="openparen">(&nbsp;</span><span title="Required" class="required">Object&nbsp;meta</span><span class="closeparen">&nbsp;)</span><div class="mdesc"><div class="short">Create a new ArrayReader</div><div class="long">Create a new ArrayReader<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>meta</code> : Object<div class="sub-desc">Metadata configuration options.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">ArrayReader</td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.data.Reader-getResponseData"></a><b class="method"><a href="source/Reader.html#method-Ext.data.Reader-getResponseData">getResponseData</a></b><span class="openparen">(&nbsp;</span><span title="Required" class="required">Object&nbsp;response</span><span class="closeparen">&nbsp;)</span><span class="colon">&nbsp;:&nbsp;</span><span class="return">Object</span><div class="mdesc"><div class="short">Takes a raw response object (as passed to this.read) and returns the useful data segment of it. This must be implemen...</div><div class="long">Takes a raw response object (as passed to this.read) and returns the useful data segment of it. This must be implemented by each subclass<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>response</code> : Object<div class="sub-desc">The responce object</div></li></ul><strong>Returns:</strong><ul><li><code>Object</code><div class="sub-desc">The useful data from the response</div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.data.Reader.html#getResponseData" ext:member="#getResponseData" ext:cls="Ext.data.Reader">Reader</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.data.Reader-read"></a><b class="method"><a href="source/Reader.html#method-Ext.data.Reader-read">read</a></b><span class="openparen">(&nbsp;</span><span title="Required" class="required">Object&nbsp;response</span><span class="closeparen">&nbsp;)</span><span class="colon">&nbsp;:&nbsp;</span><span class="return">Ext.data.ResultSet</span><div class="mdesc"><div class="short">Reads the given response object. This method normalizes the different types of response object that may be passed
to ...</div><div class="long">Reads the given response object. This method normalizes the different types of response object that may be passed
to it, before handing off the reading of records to the <a href="output/readRecords.html" ext:cls="readRecords">readRecords</a> function.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>response</code> : Object<div class="sub-desc">The response object. This may be either an XMLHttpRequest object or a plain JS object</div></li></ul><strong>Returns:</strong><ul><li><code>Ext.data.ResultSet</code><div class="sub-desc">The parsed ResultSet object</div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.data.Reader.html#read" ext:member="#read" ext:cls="Ext.data.Reader">Reader</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.data.JsonReader-readRecords"></a><b class="method"><a href="source/JsonReader.html#method-Ext.data.JsonReader-readRecords">readRecords</a></b><span class="openparen">(&nbsp;</span><span title="Required" class="required">Object&nbsp;data</span><span class="closeparen">&nbsp;)</span><span class="colon">&nbsp;:&nbsp;</span><span class="return">Ext.data.ResultSet</span><div class="mdesc"><div class="short">Reads a JSON object and returns a ResultSet. Uses the internal getTotal and getSuccess extractors to
retrieve meta da...</div><div class="long">Reads a JSON object and returns a ResultSet. Uses the internal getTotal and getSuccess extractors to
retrieve meta data from the response, and extractData to turn the JSON data into model instances.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>data</code> : Object<div class="sub-desc">The raw JSON data</div></li></ul><strong>Returns:</strong><ul><li><code>Ext.data.ResultSet</code><div class="sub-desc">A ResultSet containing model instances and meta data about the results</div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.data.JsonReader.html#readRecords" ext:member="#readRecords" ext:cls="Ext.data.JsonReader">JsonReader</a></td></tr></tbody></table><a id="Ext.data.ArrayReader-events"></a><h2>Public Events</h2><div class="no-members">This class has no public events.</div></div>